package com.heima.article.controller.v1;

import com.heima.api.article.ApArticleControllerApi;
import com.heima.article.service.ApArticleService;
import com.heima.model.article.datos.ArticelDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/article")
public class ApArticleController implements ApArticleControllerApi {

    @Autowired
    private ApArticleService articleService;

    /**
     * 保存app端相关的文章
     * @param articelDto
     * @return
     */
    @PostMapping("/save")
    @Override
    public ResponseResult saveApArtice(@RequestBody ArticelDto articelDto) {
        return articleService.saveApArtice(articelDto);
    }
}